﻿using SDF.Core;
using SDF.Core.Domain.Projects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SDF.Plugin.Misc.DynamicEntity.Domain
{
    public class DynamicEntityHeader : DEEntityBase, IProjectMappingSupported
    {
        public DynamicEntityHeader()
        {
            //Fields = new List<DynamicEntityItem>();
        }

        public string SAPInstance { get; set; }

        public string Description { get; set; }

        public bool LimitedToProjects { get; set; }

        private IList<DynamicEntityItem> _fields;

        public virtual IList<DynamicEntityItem> Fields
        {
            get
            {
                if (_fields == null)
                    _fields = new List<DynamicEntityItem>();
                return _fields;
            }
            set
            {
                _fields = value;
            }
        }

        public virtual DynamicEntityItem ReferBy { get; set; }
    }
}